home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 52
/
Amiga Format AFCD52 (Issue 136, May 2000).iso
/
-serious-
/
workbench
/
convert35icon
/
install
< prev
next >
Wrap
Text File
|
2000-02-28
|
6KB
|
250 lines
; $VER: Installation script for Convert35Icon 1.0 (14. Luty 2000)
; © Rafal Mania 'Manius'
; Created with GoldED 6.2
; check if we are running under correct OS
(if (< (/ (getversion) 65536) 40)
(
(abort "Incorrect OS version (software requires OS 40 or better )!")
)
)
; error handling
(onerror
(if (> @ioerr 0)
(
(message
("An error has occurred during installation. Please check the log file to understand the error.")
)
)
)
(exit (quiet))
)
(set sourcePath (expandpath (pathonly @icon)))
(set #installmode
(askbool
(prompt "Choose the installation mode:")
(help (cat "\nYou may here choose if You want install/remove ")
" supplied package.\n")
(choices
"Install"
"Uninstall"
)
(default 1)
)
)
(if (= #installmode 1)
; normal installation
(
(welcome)
; --- insert your code below ---
(set #os31
(askbool
(prompt "Do You want OS3.1 version installed?")
(help (cat "\nThere is a special version of Convert35Icon for OS3.1 "
"which doesn't need OS3.5 installed.\n\nInstead "
"only icon.library V44+ is needed (not included).\n\n"
"The OS3.5 version has more features then OS3.1 version, "
"but it NEEDS OS3.5")
)
(choices
"Yes"
"No"
)
(default 2)
)
)
(if (= #os31 1)
(
(run
(cat (tackon sourcepath "gpatch ")
(tackon sourcepath "Convert35Icon ")
(tackon sourcepath "patches.ptg ")
"T:Convert35Icon_OS31"
)
(prompt "Now patching the Convert35Icon executable")
(help (cat "\nIf You want to use Convert35Icon on OS3.1 machine,"
" original Convert35Icon has to be patched." )
)
(confirm)
)
(copyfiles
(prompt "Copying OS3.1 version of Convert35Icon")
(source "T:Convert35Icon_OS31")
(dest (expandpath "C:"))
(newname "Convert35Icon")
(confirm)
(optional "fail")
(help (cat"\nThe patched version of Convert35Icon will be"
" copied to specified destination.")
)
)
(set #iconlib
(askfile
(prompt "Choose icon.library V44+ to patch")
(help (cat"\nAs the OS3.1 version of Convert35Icon needs"
" some function from OS3.5 icon.library,"
" the original one has to be patched.\n"
"Only three versions are supported:\n"
"Original OS3.5 distribution (44616 bytes)\n"
"BoingBag1 update (44804 bytes)\n"
"DirectoryOpus 5.82 update (44808 bytes)")
)
(default "RAM:")
)
)
(working "Now patching selected library")
(run
(cat (tackon sourcepath "gpatch ")
(cat #iconlib " ")
(tackon sourcepath "patches.ptg ")
"T:ic35.library"
)
(prompt "The OS3.5 icon.library will be patched now")
(help "The patching programm will be started now\n")
(confirm)
)
(copylib
(prompt "Now copy the patched icon.library")
(source "T:ic35.library")
(dest (expandpath "LIBS:"))
(confirm)
(newname "ic35.library")
(optional "fail")
(help (cat"\nThe patched icon.library HAS to be"
" copied to LIBS: assign as ic35.library."
)
)
)
)
; else
(
(copyfiles
(prompt "Now copying the OS3.5 version of Convert35Icon")
(source "Convert35Icon")
(dest (expandpath "C:"))
(confirm)
(optional "fail")
(help (cat"\nThe OS3.5 version of Convert35Icon will be copied"
" to specified destination.")
)
)
)
)
; --- end of your code ---
(exit)
)
; uninstall application
(
(welcome)
; --- insert your code below ---
(delete "LIBS:ic35.library"
(prompt "Deleting ic35.library")
(confirm)
(optional "force")
(help "The patched icon.library will be removed.")
)
(delete "C:Convert35Icon"
(prompt "Deleting Convert35Icon")
(confirm)
(optional "force")
(help "The Convert35Icon executable will be removed.")
)
; -- end of your code ---
(message "Uninstallation completed.")
(exit (quiet))
)
)